#ifndef ELEMENTLOAD_H
#define ELEMENTLOAD_H

#include <QHash>
#include <QImage>
#include <QSettings>

/**
 * @brief 工具类 单例模式
 */
class ElementLoad
{
    Q_DISABLE_COPY(ElementLoad)
public:
    static ElementLoad& getInstance();

    void readBoxIni();
    void readGameIni();
    void readEnemyIni();
    void readPlayerIni();
    void readImageIni();


    const QStringList &gameList() const;

    const QHash<QString, QStringList> &boxMap() const;

    const QHash<QString, QStringList> &enemyMap() const;

    const QHash<QString, QStringList> &playMap() const;

    const QHash<QString, QImage> &imageMap() const;


private:
    ElementLoad();

    QHash<QString, QImage> m_imageMap;// 图片
    QHash<QString, QStringList> m_playMap;// 主角
    QHash<QString, QStringList> m_enemyMap;// 敌人
    QHash<QString, QStringList> m_boxMap;// 箱子

    QStringList m_gameList;// 游戏的流程控制（敌人出场控制）

    QString m_fileName;

};

#endif // ELEMENTLOAD_H
